package com.zhu.ttwords.model;

import com.zhu.ttwords.TTWORDS;
import com.zhu.ttwords.bean.WordBean;
import com.zhu.ttwords.common.DBTool;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by KnightYe on 2015/4/6.
 */
public class StudyModel implements IStudyModel{
    @Override
    public List<Object> loadWords() {
        List<Object> mData = new ArrayList<>();
        String[] param = new String[2];
        param[0] = TTWORDS.getAppSetting().getBook() + "";
        param[1] = TTWORDS.getAppSetting().getGroup() + "";
        try {
            mData = DBTool.getDataBean(WordBean.class, TTWORDS.SQL_STUDY_INIT_STUDY, param);
        } catch (InstantiationException | IllegalAccessException e) {
            e.printStackTrace();
        }
        return mData;
    }
}
